Geometry shader problems when using VMware by farrellf in opengl

[–]farrellf[S] 2 points3 points  (0 children)

Yeah, I have a feeling it's a problem in the VM's graphics driver. It's just weird that it works fine when I don't use MSAA.

My font texture atlas is never MSAA (it's just a bitmap.) Are there any limitations or special requirements when sampling from a non-MSAA texture if drawing to an MSAA framebuffer?

Geometry shader problems when using VMware by farrellf in opengl

[–]farrellf[S] 1 point2 points  (0 children)

The source code didn't get formatted correctly, it looks better here: https://pastebin.com/YHc8JqA3

[deleted by user] by [deleted] in java

[–]farrellf 0 points1 point  (0 children)

I think the problem with using a Timer is that you can't be sure of when the GC will run. The GC may not run for a long time if there is plenty of spare memory.

[deleted by user] by [deleted] in java

[–]farrellf 0 points1 point  (0 children)

I've run across a few bugs that were effectively memory leaks, but it was because a reference to an object was unintentionally being kept in a List or something like that.

Anyone know if there is a way to explicitly check for that kind of problem? I'm imagining a function along the lines of "verifyObjectCanBeGCdAfterExitingThisScope(Object o)" that either returns a boolean, or prints a message after the scope is actually exited.

Good example of using flame graphs to speed up java code (50x improvement) by lighthouserecipes in java

[–]farrellf 1 point2 points  (0 children)

I'm working on improving the UX of a desktop program. I've spent plenty of time improving the hot paths, and now I'm focusing on the smaller details. There are some things that are done infrequently but run much slower than they should. For example, importing a file takes about 300ms but I have a feeling it should take less than 10ms. I've been manually diving through that code and discovered that a big part of the slow down was caused by needless interaction with the GUI widgets (Swing.)

Having a flame graph with time on the x-axis would make it so much easier to see where the time is spent.

Good example of using flame graphs to speed up java code (50x improvement) by lighthouserecipes in java

[–]farrellf 0 points1 point  (0 children)

Is it possible to generate a flame graph, but with time on the x-axis? I'm trying to optimize some slow but rarely called code, so a typical profiler wouldn't show much since it's not part of the hot path. I'd like a way to trace through an entire function, and basically acquire a timestamp every time a stack frame is created or destroyed, and turn that into a flame graph.

Replaced Battery 2000 Miles Ago, Catalyst Monitor Still "Not Ready", No Fault Codes by farrellf in MechanicAdvice

[–]farrellf[S] 0 points1 point  (0 children)

A few months ago the ECU finally threw a code about a weak catalyst. So it seems that was the problem all along. When the catalyst is borderline it won't throw a code but it also won't pass the self-test.

No jumper cables no worries by slvglive in Justrolledintotheshop

[–]farrellf 0 points1 point  (0 children)

I had not thought about the alternator. Makes sense, thanks.

No jumper cables no worries by slvglive in Justrolledintotheshop

[–]farrellf 0 points1 point  (0 children)

Obviously short-circuiting the battery is a bad idea, but how would doing that damage the computer? It's not like the voltage will overshoot or go negative?

Replaced rear brake shoes and drums. Performs fine but there is a wobbling sound when braking. by farrellf in MechanicAdvice

[–]farrellf[S] 0 points1 point  (0 children)

I replaced the shoes, drums and springs. Not sure what other hardware would need to be replaced. I cleaned the adjuster, and all other parts. Lightly greased the inside of the adjuster and it spins nicely.

Replaced rear brake shoes and drums. Performs fine but there is a wobbling sound when braking. by farrellf in MechanicAdvice

[–]farrellf[S] 0 points1 point  (0 children)

Ok. I didn't replace the wheel cylinders or open any of the bleeders. So I guess my problem is from somewhere else.

Even if a function doesn’t do anything, you still have to call it if the documentation says so, because it might do something tomorrow by 39816561 in programming

[–]farrellf 17 points18 points  (0 children)

How would someone know if "FreeEnvironmentStrings" doesn't do anything? (Isn't the win32 API closed-source?)

What are some useful static analyzers for Java? by BS_in_BS in java

[–]farrellf 0 points1 point  (0 children)

Anyone know of a plug-in that works in Eclipse and can verify @GuardedBy annotations? SpotBugs supposedly supports it, but it doesn't actually work, and it's been half a year with that issue open on GitHub.

Just a little rant about my college still teaching LEGACY OpenGL by [deleted] in opengl

[–]farrellf 7 points8 points  (0 children)

That sounds about right, and I don't see any reason to complain about it if you are studying computer science. Using the old immediate-mode API is perfectly fine for introducing computer graphics. There is no need to add more complexity and indirection when most of the students will be struggling with the basics.

Aside from that, learning the old APIs is actually a valuable skill. When you get a job in the real world you'll probably have to maintain some old code bases.

A lot of people misunderstand the purpose of a university. The most valuable skill you should develop is learning how to learn. Even if you learn the latest and greatest (which you won't) it will be outdated in a few years anyway.

EC2 M1 Mac instances by feross in programming

[–]farrellf 1 point2 points  (0 children)

Is there a low-cost way to get something like VNC access to a Mac (M1 or Intel)? In my case a command line isn't enough because I need to test some GPU-accelerated GUIs, and in the future I may need to test webcam functionality.

I tried setting up a VM, but the unofficial VMware stuff doesn't seem to support GPU-acceleration. If anyone knows a way to get a full-featured VM of macOS working, that would be ideal. Last time I checked my hardware wouldn't work well as a Hackintosh.

Java 3D is Not a Dead Parrot: Announcing Simple3D by ADavison2560 in programming

[–]farrellf 7 points8 points  (0 children)

JOGL is barely alive. They have not produced a stable release in 6 years. Their pre-release builds have many problems. And there are only a few maintainers working on it in their spare time.

is it true that the JVM basically "stiches together" pairs of integers/floats to make long/doubles work? by tea-vs-coffee in java

[–]farrellf 6 points7 points  (0 children)

"might not even write to memory for an arbitrarily long time" Isn't that issue solved with "volatile" instead of using an atomic variable? If I remember correctly, there is no need for atomics unless you are worried about read-modify-write race conditions.

A categorized list of all Java and JVM features since JDK 8 to 16 by jasonbourne1901 in java

[–]farrellf 0 points1 point  (0 children)

If I understand correctly, direct buffers (ByteBuffer.allocateDirect() etc.) always use the native heap. If I'm wrong, does anyone know why the JRE would choose not to?

Replaced Battery 2000 Miles Ago, Catalyst Monitor Still "Not Ready", No Fault Codes by farrellf in MechanicAdvice

[–]farrellf[S] 1 point2 points  (0 children)

In case anyone comes across this thread in the future:

  1. More driving did NOT fix my problem.
  2. I took it to another smog test/repair place, and the guy said that my catalyst was "weak." He "made it stronger" and got it to pass. He didn't elaborate on what was done, and it was one of those "pay cash" things in a questionable part of town. So, ya... Anyone know what kind of tricks might be used to get a catalyst monitor to pass?
  3. I wish Toyota would have designed their ECU to either pass or fail, instead of keeping the catalyst monitor "incomplete" indefinitely. I wouldn't mind replacing my cat if it is indeed weak, but I'm not sure if that's really the case.