Click here to Skip to main content
14,603,943 members

C / C++ / MFC

 
GeneralRe: array of 32bit container Pin
jeron124-Apr-20 14:27
Memberjeron124-Apr-20 14:27 
GeneralRe: array of 32bit container Pin
Member 1481234224-Apr-20 20:48
MemberMember 1481234224-Apr-20 20:48 
GeneralRe: array of 32bit container Pin
Victor Nijegorodov24-Apr-20 21:24
MemberVictor Nijegorodov24-Apr-20 21:24 
GeneralRe: array of 32bit container Pin
Member 1481234224-Apr-20 20:52
MemberMember 1481234224-Apr-20 20:52 
GeneralRe: array of 32bit container Pin
Member 1481234224-Apr-20 20:53
MemberMember 1481234224-Apr-20 20:53 
GeneralRe: array of 32bit container Pin
Richard MacCutchan24-Apr-20 22:07
mveRichard MacCutchan24-Apr-20 22:07 
QuestionFile Explorer Properties Dialog - SOLVED Pin
Richard Andrew x6424-Apr-20 4:27
professionalRichard Andrew x6424-Apr-20 4:27 
QuestionOpenGL stencil not working... Pin
Vaclav_22-Apr-20 10:38
MemberVaclav_22-Apr-20 10:38 
Please read carefully.
I am not looking for RTFM replies.
I am getting nowhere in OpenGL forum.
I do understand this is NOT OpenGL forum.


I am NOT looking for fancy shading graphics,
I am not looking for how to retrieve object outline either.

I am looking for as detailed as possible practical flow in using OpenGL stencil.
I have bits and pieces and it is all just "try this ... try that..."

I am looking for help, not for pointless criticism of my coding style.
If you cannot help me , please dot not reply.




glPushAttrib( GL_ALL_ATTRIB_BITS);
// must clear all for resizing
// TOK resizing works !
glClear(
GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);

glClearStencil(0); // why and what ???
glEnable( GL_STENCIL_TEST); // TOK
// glStencilMask is set to 1 as default (??)
//glStencilMask(0x00); // no effect
//glStencilMask(0xFF); // no effect
{
// process object block is this correct place ??
OpenGL_Render_RealAxis(); // int parameter = 0)
OpenGL_Render_Plus_IMG_Axis(); //int parameter = 0)
OpenGL_Render_Minus_IMG_Axis(5); //passed temporary last circle as parameter 5 }

// TOK turn off writing to color buffer - do no show object to be stenciled
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
// Set the stencil buffer to write a 1 in every time
// a pixel is written to the screen
glStencilFunc( GL_ALWAYS, 1, 0xFFFF);
glStencilOp( GL_KEEP, GL_KEEP, GL_REPLACE);
{
// process block dupe
OpenGL_Render_RealAxis(); // int parameter = 0)
OpenGL_Render_Plus_IMG_Axis(); //int parameter = 0)
OpenGL_Render_Minus_IMG_Axis(5); //passed temporary last circle as parameter = 0)
}


parameter_stencil = 42; // verify stencil function
parameter_stencil = Stencil(parameter_stencil);
if (parameter_stencil == 0) {
printf(
"\nTOK HERE Stencil full circle parameter %i @function %s @line %i",
parameter_stencil, __FUNCTION__, __LINE__);
glStencilFunc(GL_EQUAL, 1, 1);
} // show / keep inside circle
else {
printf(
"\nStencil last circle parameter %i @function %s @line %i",
parameter_stencil, __FUNCTION__, __LINE__);
glStencilFunc(GL_NOTEQUAL, 1, 1);
} // keep all outside of stencil
// now showing all - stencil plus object ??
glFlush();
glStencilOp( GL_KEEP, GL_KEEP, GL_REPLACE);
glutSwapBuffers(); // no change !
AnswerRe: OpenGL stencil not working... Pin
leon de boer22-Apr-20 19:16
Memberleon de boer22-Apr-20 19:16 
GeneralRe: OpenGL stencil not working... Pin
Vaclav_23-Apr-20 3:10
MemberVaclav_23-Apr-20 3:10 
GeneralRe: OpenGL stencil not working... Pin
Vaclav_23-Apr-20 8:11
MemberVaclav_23-Apr-20 8:11 
QuestionCross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Hans99922-Apr-20 0:57
MemberHans99922-Apr-20 0:57 
AnswerRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Richard MacCutchan22-Apr-20 3:47
mveRichard MacCutchan22-Apr-20 3:47 
AnswerRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
k505422-Apr-20 4:07
mvek505422-Apr-20 4:07 
SuggestionRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
David Crow22-Apr-20 5:18
MemberDavid Crow22-Apr-20 5:18 
GeneralRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Richard MacCutchan22-Apr-20 6:25
mveRichard MacCutchan22-Apr-20 6:25 
GeneralRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
David Crow22-Apr-20 6:43
MemberDavid Crow22-Apr-20 6:43 
GeneralRe: Cross Reference/Reporting Tool avaiable which does not resolve macros? Pin
Richard MacCutchan22-Apr-20 6:51
mveRichard MacCutchan22-Apr-20 6:51 
Question'get_osfhandle': identifier not found Pin
_Flaviu20-Apr-20 0:13
Member_Flaviu20-Apr-20 0:13 
AnswerRe: 'get_osfhandle': identifier not found Pin
Richard MacCutchan20-Apr-20 0:37
mveRichard MacCutchan20-Apr-20 0:37 
GeneralRe: 'get_osfhandle': identifier not found Pin
leon de boer20-Apr-20 2:05
Memberleon de boer20-Apr-20 2:05 
GeneralRe: 'get_osfhandle': identifier not found Pin
Richard MacCutchan20-Apr-20 3:28
mveRichard MacCutchan20-Apr-20 3:28 
QuestionSOLVED Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 8:38
MemberVaclav_18-Apr-20 8:38 
AnswerRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 9:07
professionalGreg Utas18-Apr-20 9:07 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 9:22
MemberVaclav_18-Apr-20 9:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.