Re: OpenGL - One of eight simple box drawings disappears ...
Paul <[email protected]> Mon, 24 Mar 2025 16:13:28 -0400
| Newsgroups | alt.comp.os.windows-xp,alt.windows7.general,comp.os.ms-windows.programmer.win32 |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On Mon, 3/24/2025 3:06 PM, R.Wieser wrote:
> Paul,
>
>> Have you considered feeding the source into an AI, and
>> asking whether your style of using Pushes and Pops is correct ?
>
> Nope. I'm not really willing to "listen" to something that can as easily
> halucinate as not.
>
> Also, I've been using the same style of pushing/popping in the same and
> several other programs. No problems there.
>
>> It is either that, or find some sample code on the web, with
>> similar intended function, and see what style they use.
>
> Using different code will quite likely make all the markers show up, but
> doesn't give me any reason to why the code I posted makes one - just one -
> diasappear.
>
> If its just the result I'm after I would just remove all the markers - I
> only added them for "debugging" (visual clues of the calculated corners).
>
>> Maybe after your GLBegin GLend, you need to restore the
>> grapical context, so the current cursor location is restored.
>
> I've shown in the code that its a marker somewhere in the middle, and no
> "cursor location" changes (translations, rotations, scaling) have been
> applied. IOW, if that one marker was moved off-screen than the next ones
> would have been moved too. And they aren't. Nor are the quads drawn after
> them (with its corners where the markers are)
>
> Also, before executing that bit of code I've got several other primitives
> drawn, all in their own glBegin / glEnd wrappers. No restoration of any
> kind there either. I've also called the same code a second time (with
> different coordinates) and it also misses the same marker. Moving the code
> to first or last executed doesn't change anything either.
>
> IOW, it seems to be something in the code I posted, but I'm unable to spot
> it (chances are that when I do find the reason it will be a "Well /ofcourse/
> its doing that" 20-20 vision moment. Than again, perhaps not ...)
>
> Regards,
> Rudy Wieser
Tsk.
For the time being, AI is the replacement for broken search engines.
And a poor one at that.
*******
Learn to use the tools, such as they are.
Remember, that in this case, you are asking a "programming style" question.
The AI has seen all manner of programs. It does not write very good
programs, but it sometimes recognizes a style. And it might be able
to tell you if "your style does not match anything I've seen".
I use AI, only to take a break from "doing everything the hard way".
Sometimes, while the AI mush comes back, I think of a solution myself.
But it represents a change of pace from banging your head against
the wall.
For example, imagine the following session.
"Hello. I have a program I wrote. It is in the language X.
Begin
printf("Hello World\n");
End
Can you see my design intent ?
If you re-wrote my program or corrected my
errors in programming, what would that program
look like ?
Am I using the graphical context Push() and Pop() properly ?
"
That's an example of using the pattern recognition of the AI,
as it isn't really all that clever, but it sucks up language like
a sponge.
Your programming style is linear, and the AI should have no trouble
whatsoever, with the analysis.
It does not do emulation runs. It does not check your work that way.
It can only do syntax analysis, which is the thing you need a hint
on right now.
Paul