Click here to Skip to main content
15,886,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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
_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
leon 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
Vaclav_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
Vaclav_18-Apr-20 9:22 
Yes, I got that far.
I need to read the passed parameter.

C++
<pre>void OpenGL_Stencil(void (*Stencil)(int parameter)) {
	
// clear all three buffers - not neccessary
	glClear(GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//enable estecil test
	glEnable(GL_STENCIL_TEST);
// turn off writing to color buffer
	glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
// enable only to verify the stencil
//glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
// setup stencil function
	glStencilFunc(GL_ALWAYS, 1, 1);							// ??
// setup stencil opertion
	glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);					// ??
// ??
	glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
// get stencil
// TDOD need parameter here
//OpenGL_Unit_Circle(0);
	Stencil(0);	// works with OpenGL_Unit_Circle(0) parameter
	glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
//
this is where I am missing how to test the parameter 
	// switch keep area
	//Stencil->paramater == 0;
//	if (Stencil->paramater == 0)
		glStencilFunc(GL_EQUAL, 1, 1);		///keep inside circle
//	else
//		glStencilFunc(GL_NOTEQUAL, 1, 1);	 // keep all outside of stencil
//
	glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);


C++


AnswerRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 10:24
professionalGreg Utas18-Apr-20 10:24 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 10:52
Vaclav_18-Apr-20 10:52 
GeneralRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 11:04
professionalGreg Utas18-Apr-20 11:04 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_19-Apr-20 5:47
Vaclav_19-Apr-20 5:47 
GeneralRe: Passing function with parameters as parameter Pin
Greg Utas19-Apr-20 6:05
professionalGreg Utas19-Apr-20 6:05 
GeneralSOLVED Re: Passing function with parameters as parameter Pin
Vaclav_19-Apr-20 9:03
Vaclav_19-Apr-20 9:03 
AnswerRe: Passing function with parameters as parameter Pin
Richard MacCutchan18-Apr-20 21:21
mveRichard MacCutchan18-Apr-20 21:21 
QuestionMath problem with C code Pin
Vaclav_18-Apr-20 6:47
Vaclav_18-Apr-20 6:47 
AnswerRe: Math problem with C code Pin
k505418-Apr-20 7:00
mvek505418-Apr-20 7:00 
GeneralSOLVED Re: Math problem with C code Pin
Vaclav_18-Apr-20 8:16
Vaclav_18-Apr-20 8:16 
QuestionRe: Math problem with C code Pin
Richard MacCutchan18-Apr-20 7:02
mveRichard MacCutchan18-Apr-20 7:02 
QuestionPass a struct as a function parameter or just use it as a global variable? Pin
Vaclav_18-Apr-20 5:23
Vaclav_18-Apr-20 5:23 
AnswerRe: Pass a struct as a function parameter or just use it as a global variable? Pin
k505418-Apr-20 6:17
mvek505418-Apr-20 6:17 
GeneralRe: Pass a struct as a function parameter or just use it as a global variable? Pin
Vaclav_18-Apr-20 6:30
Vaclav_18-Apr-20 6:30 
Questioncomputational cost of math functions Pin
Calin Negru17-Apr-20 5:06
Calin Negru17-Apr-20 5:06 
AnswerRe: computational cost of math functions Pin
OriginalGriff17-Apr-20 5:10
mveOriginalGriff17-Apr-20 5:10 
GeneralRe: computational cost of math functions Pin
Calin Negru17-Apr-20 6:58
Calin Negru17-Apr-20 6:58 

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.